package com.xbao.controller;

import com.xbao.core.http.CommRequest;
import com.xbao.core.http.CommResult;
import com.xbao.model.ClsNotify;
import com.xbao.service.ClsNotifyService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

@Api(value = "/clsNotify", tags = "clsNotify")
@RequestMapping(value = "clsNotify")
@Controller
@EnableAutoConfiguration
public class ClsNotifyController extends BaseController {
    @Resource
    private ClsNotifyService notifyService;

    @ApiOperation(value = "save", notes = "save")
    @RequestMapping(value = "/save", method = RequestMethod.POST)
    @ResponseBody
    public CommResult saveClsNotify(@RequestBody CommRequest<ClsNotify> clsNotifyCommRequest) {
        notifyService.saveClsNotify(clsNotifyCommRequest.getData());
        return result();
    }
}
